<?php
$username = "Muurverf";
$password = "passwd";
if($_GET[op] == 'logout')
{
 header('WWW-Authenticate: Basic realm="Click \'Ok\' then \'Cancel\' to Log Out"');
 header('HTTP/1.0 401 Unauthorized');
 echo 'You have been successfully logged out. Click <a href="index.php">here</a> to log back in.';
 exit();
}
if (!isset($_SERVER['PHP_AUTH_USER'])) {

header('WWW-Authenticate: Basic realm="My Site"');
header('HTTP/1.0 401 Unauthorized');
  echo 'You must enter a valid username and password to access this resource.';
exit();

} else {

/*if (($_SERVER['PHP_AUTH_USER'] == $username) && ($_SERVER['PHP_AUTH_PW'] == $password)) { 

	echo "The username and password you have entered are correct!";
	echo "Welcome. <a href='../website/index.php?op=logout'>Logout?</a>";
  	echo "Welcome. <a href='Sessiontest.php?op=logout'>Logout?</a>";
  	}
  	else {

echo "The username and/or password you have entered is incorrect!";
exit();

}
*/
	echo "Welcome op Session2. <a href='Sessiontest2.php?op=logout'>Logout?</a>";
	echo "Go to Session1<a href='Sessiontest.php'>Sessiontest1?</a>";
}
?>